/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.deployment.preference;

import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.FontFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.cea.papyrus.core.utils.Debug;
import com.cea.papyrus.diagram.deployment.Activator;

/**
 * Defines the execution environment preference page.
 * 
 * @author Gilles Cannenterre
 * @since 15 janv. 07
 */
public class ExecutionEnvironmentPreferencePage extends FieldEditorPreferencePage
	implements IWorkbenchPreferencePage {

	/**
	 * The channel.
	 */
	private int channel = 205;

	/**
	 * The Constructor.
	 */
	public ExecutionEnvironmentPreferencePage() {
		super(GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Execution Environment Preferences");
	}
	
	/**
	 * Creates the field editors.
	 */
	@Override
	public void createFieldEditors() {
		Debug.debug(this,"createFieldEditors()", channel);
		addField(new ColorFieldEditor(DeploymentDiagramPreferenceConstants.P_EXECUTIONENVIRONMENT_BACKGROUNDCOLOR, 
				"Background Color", getFieldEditorParent()));
		addField(new ColorFieldEditor(DeploymentDiagramPreferenceConstants.P_EXECUTIONENVIRONMENT_BORDERCOLOR, 
				"Border Color", getFieldEditorParent()));
		addField(new ColorFieldEditor(DeploymentDiagramPreferenceConstants.P_EXECUTIONENVIRONMENT_FONTCOLOR, 
				"Font Color", getFieldEditorParent()));
		addField(new FontFieldEditor(DeploymentDiagramPreferenceConstants.P_EXECUTIONENVIRONMENT_FONT, 
				"Font", getFieldEditorParent()));
	}

	/**
	 * Init.
	 * 
	 * @param workbench the workbench
	 */
	public void init(IWorkbench workbench) {
	}	
}